# !/usr/bin/env python
# -*-coding:utf-8 -*-

"""
# Author     ：skyTree
# version    ：python 3.11
# Description：attr的schemas
"""
from pydantic import BaseModel, Field
from typing import Union
from .base import BaseResponse, DetailBaseResp, PageResponse


class AttrAddSchemas(BaseModel):
    name: str
    val: Union[str, None] = None
    type: str
    cid_id: int


class AttrEditSchemas(AttrAddSchemas):
    id: int


class AttrOutSchemas(AttrEditSchemas):
    pass


class AttrResponseSchemas(BaseResponse):
    data: AttrOutSchemas


class AttrPageListResponseSchemas(DetailBaseResp):
    data: PageResponse
